#include <stdio.h>
#include <stdlib.h>


int main()
{
	int *p = NULL;
	p = malloc(sizeof(int));
	if(NULL == p)
	{
		printf("malloc() error!\n");
		exit(1);
	}


	printf("%d\n",*p);
	*p = 20;

	printf("%d\n",*p);

	free(p);


	// malloc for arr
	int *p1;
	int i;
	int num = 5;

	p1 = malloc(sizeof(int) * num);
	for(i = 0 ; i < num ; i++)
	{
		scanf("%d",&p1[i]);
	}




	for(i = 0 ; i < num ; i++)
	{
		printf("%d ",p1[i]);

	}

	printf("\n");















	return 0;

}













